Skip to content

Fixed the keyboard hud's menu key and the missing ISO key - #6852

Open
dekrom wants to merge 1 commit into
MeteorDevelopment:masterfrom
dekrom:fix/keyboard-hud-menu-iso-keys
Open

dekrom wants to merge 1 commit into
MeteorDevelopment:masterfrom
dekrom:fix/keyboard-hud-menu-iso-keys

Conversation

@dekrom

@dekrom dekrom commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Type of change

  • Bug fix
  • New feature

Description

Two small things in the keyboard hud layouts.

The menu key was created from SDLKeycode.SDLK_MENU, which is a keycode (0x40000076), but
Keybind.fromKey takes a scancode, so the key could never light up and its label was the long
untranslated key name shrunk down to fit. The context menu key on PC keyboards is
SDL_SCANCODE_APPLICATION. MC calls that one "Application", so I used keyNamed to keep the
"Menu" label, like AltGr does.

The ISO layout had the key between left Shift and Z commented out (the KEY_WORLD_2 TODO). On SDL
that is SDL_SCANCODE_NONUSBACKSLASH, and the row already leaves exactly one key of room for it
(Z starts at lShiftEnd + ux(1)).

#6792 touches the same file, but other lines (Key#matches and isNativelyPressed), so the two
don't conflict.

Related issues

None that I found.

How Has This Been Tested?

ISO layout in game: the gap between LSh and Z now has the key in it ("<" with my layout), and the
menu key reads "Menu" instead of the shrunk raw name. I couldn't check the menu key lighting up,
my VNC setup doesn't seem to send it as the application key.

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant